package com.share.shareplatform.shareorder.service.feign;

import com.share.shareplatform.pojo.User;
import com.share.shareplatform.util.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@Component
@FeignClient(value = "share-user")
public interface UserService {

    @GetMapping("/user/{id}")
    Result findOneById(@PathVariable("id") Long id);

    @GetMapping("/user/username/{username}")
    Result findOneByUsername(@PathVariable("username") String username);
}
